Method and device for padding data segments with a fill pattern and subsequent over-writing with information, in addition to corresponding bus system

ABSTRACT

A method and device are described for padding segments for transmitting data on a bus system and a bus system. The segments have a predetermined total number of bytes and the data being transmitted in segments, in the event of a transmission of data including fewer bytes than the predetermined total number of the segment, the missing bytes of the data being padded to the total number of the segment by a filling pattern of a corresponding byte number, distinguished in that a filling pattern, whose byte number corresponds to the total number of the segment, is first written into the segment and the bytes of the data are subsequently written into the same segment, the particular bytes of the filling pattern being overwritten by the bytes of the data.

FIELD OF THE INVENTION

The present invention relates to a method and a device for paddingsegments for transmitting data on a bus system and a corresponding bussystem.

BACKGROUND INFORMATION

The networking of control devices, sensors, and actuators with the aidof a communication system, a bus system, has drastically increased inrecent years in the construction of modem motor vehicles or even inmechanical engineering, in particular in the field of machine tools andin automation. Synergistic effects may be achieved in this case bydistributing functions to multiple control devices. These are referredto as distributed systems. Different stations communicate increasinglyvia a bus or a bus system. The communication traffic on the bus system,access and receiving mechanisms, and error management are regulated viaa protocol.

The CAN (controller area network) is established as the protocol in thefield of motor vehicles. This is an event-controlled protocol, i.e.,protocol activities such as the transmission of a message are initiatedby events having their origin outside the communication system itself.The unique access to the communication system or bus system is triggeredvia priority-based bit arbitration. A requirement for this is that everymessage is assigned a unique priority. The CAN protocol is veryflexible. Adding further nodes and messages is therefore possiblewithout problems as long as there are still free priorities.

An alternative approach to such an event-controlled, spontaneouscommunication is the purely time-controlled approach. All communicationactivities on the bus are strictly periodic. Protocol activities such asthe transmission of a message are triggered only by the progression of atime that is valid for the entire bus system. Access to the medium isbased on the assignment of time ranges or time slots in which atransmitter has the exclusive transmission right. Adding new nodes ispossible when the corresponding time slots were previously left free.This circumstance requires the message sequence to be established evenbefore startup, an operating plan being prepared that must fulfill therequirements of the messages in regard to repetition rate, redundancy,deadlines, etc.

In addition to the event-controlled approach and the purelytime-controlled approach, a time-controlled CAN approach, the TTCAN(time triggered controller area network), is also known. This fulfillsthe requirements described above for time-controlled communication andthe requirements for a certain degree of flexibility. The TTCAN fulfillsthese requirements through the construction of the communication cycle(basic cycle) in exclusive time windows or time slots for periodicmessages of specific communication users and in arbitrating time windowsor time slots for spontaneous messages of multiple communication users.

In addition to the cited bus systems, a plurality of bus orcommunication systems for connecting users in distributed systems areknown. In the framework of the cited bus systems and other bus systems,for example, before the background of the flexibility, the width of thetime slots or of the segment provided for data transmission isselectable in each case through the total number of bits transmittedtherein. However, if the width of the data segment or shorter segment ortime slot is selected or preset, particularly during configuration, thelength of the message transmitted therein is fixed by this selectedtotal number of bits or the selected width. This means that longermessages must be distributed over multiple such segments and shortermessages must be padded in order to reach the total number of bits inthe segment. This is referred to as padding. Such padding of missingdata in a segment is described in regard to a bus system in U.S. Pat.No. 5,598,579. U.S. Pat. No. 6,349,348 also shows padding, i.e., thepadding of missing data with a filling pattern if the data size issmaller than a predetermined size.

However, in this case, the actual data content is first copied into amemory or buffer, for example, and subsequently supplemented with thepadding pattern or filling pattern in order to obtain the predeterminedtotal number of bits or the total size of the segment. The followingtypes of error may arise in this case, however:

-   -   Through the later addition of the filling pattern, the message        content is partially overwritten resulting in an incorrect        message content or data content.    -   The message or data content is completely overwritten, an        incorrect data content or message content also resulting in this        case.    -   Furthermore, the actual message length, i.e., the number of data        bits, may be supplemented past the permissible length, further        message contents or data contents of undefined content then        arising, thereby also resulting in an incorrect message content        or data content in this case.

Therefore, it has been shown that the cited related art is not capableof providing optimal results in every aspect, from which the objectresults of improving the situation, in particular of controlling thedescribed sources and types of error.

SUMMARY OF THE INVENTION

The present invention describes a method and a device for paddingsegments for transmission of data on a bus system, the segments having apredetermined total number of binary information pieces, particularlybytes, and the data being transmitted in segments, in the event of atransmission of data including less binary information, bytes inparticular, than the predetermined total number of the segment, themissing binary information, bytes in particular, of the data beingpadded to the total number of the segment through a filling patterncorresponding to the number of binary information pieces, bytes inparticular, a filling pattern whose number of binary information pieces,bytes in particular, corresponds to the total number of the segmentfirst being written into the segment and the binary information, bytesin particular, of the data subsequently being written into the samesegment, the particular binary information, bytes in particular, of thefilling pattern being overwritten by the binary information, bytes inparticular, of the data. Therefore, the above-mentioned error sourcesmay advantageously be prevented, since the filling pattern isoverwritten with the regular data and not vice versa.

Advantageously, in regard to a bus system according to the presentinvention, the binary information, bytes in particular, of the fillingpattern and the binary information, bytes in particular, of the data iswritten in a buffer memory into the segment, and this segment is thentransmitted out of the buffer memory to the bus system in the frameworkof the access and receiving mechanisms, i.e., at the instant provided.

This is advantageously a time-controlled bus system in this case, thesegments corresponding directly to time slots on the bus system, thedata being transmitted in the corresponding time slots. A bus systemaccording to the present invention divides a communication cycle into astatic segment and a dynamic segment in this case, a preset of the totalnumber of bits of the segment that may be selected freely duringconfiguration being made possible in the static segment in particular.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a distributed system, i.e., a network or a bus systemhaving at least one user and means for performing the method accordingto the present invention.

FIG. 2 shows an example of a communication cycle according to thepresent invention having segments lined up for data transmission.

DETAILED DESCRIPTION

FIG. 1 shows a bus system 100 having a first user 101, a second user102, and a third user 103, i.e., a distributed system. Sincecommunication is possible via the users themselves or computing units orcontrol units contained therein, as well as via separate control units,such as a bus controller, which is located internally or externally inrelation to the users, the concepts of bus system and distributed systemare used interchangeably in the following. This means that the bussystem may be both the pure communication link to control units tomaintain or produce communication and also the communication link toconnected users, who in turn produce communication, as well as mixedsystems including both variants.

Therefore, users 101 to 103 also represent three variants of userstructures, further variants being immediately obvious and also usablevia combination, but are not shown for reasons of clarity. User 101shows an interface 104 to bus 100 having a processing unit 113, whichcontains a buffer memory 107 and a control unit or a microcomputer or aprocessor 110, which is shown separately from interface unit 104 in thefirst example. This means that communication is controlled in the useritself, for example. User 102 again shows an interface unit 105, whichcontains buffer memory 108 in this case. Processing unit 114 thereforedoes not contain the buffer memory, but merely control unit 111, i.e.,the control may be performed by the user itself here, the bufferingoccurring in interface unit 105. Interface unit 104 or 105 itself mayalso be internally or externally located in relation to the user in thiscase. As a further example, user 103 shows an interface unit 106 which,in addition to buffer memory 109, also contains a processing unit, inparticular a control unit such as a bus controller 112. In this case,the entire communication is therefore processed and controlled byinterface unit 106. Interface unit 106 may also be positioned internallyor externally in relation to user 103 in this instance. The processingunits, in particular 110 and 111, are also able to process further tasksin addition to controlling communication.

In the exemplary bus system shown in FIG. 1, an exemplary communicationoccurs in the course of a communication cycle as shown in FIG. 2. S1through S10 show different segments, in particular time segments, i.e.,time slots or slots for data transmission. In an exemplary specificationfor a bus system and a corresponding bus protocol, the static segment ofa communication cycle or even the entire communication cycle is dividedinto N time units or time slots, in particular segments, slots, for datatransmission, which are provided for the transmission of messages, i.e.,data. A unique assignment of the user or bus node to the particularmessage, i.e., the data content, as well as the segment, i.e., slot S1through S10, is possible in this case, in particular via an identifier,a frame ID. In this context, the segment width may be selected freelyduring configuration of the communication, the length of the messagestransmitted therein in all segments of the static segment also beingselected with the selected width, i.e., the total number of bits able tobe transmitted in such a segment. This means that in this example, astatic segment from T1 through T29 is shown having 10 segments or slots,the total duration of the segment corresponding to the length of slot S1through S10 and an associated segment intermediate space, the interframegap.

Furthermore, the length of a segment S1 through S10 is selected as 16bytes and shown, for example, in first segment S1 from T1 through T17.Since interframe gap IG may be arbitrary, in particular even 0, only thedata-carrying segment is identified as a segment in this example.However, the duration of the segment is actually the data-carryingsegment plus the associated interframe gap, i.e., S1+IG1 in this case,which is followed by the next segment. This means that longer messages,i.e., in this example greater than 16 bytes in particular, must bedistributed over a plurality of segments by a higher application layer,as this is performed in the course of message segmenting, e.g., by theFTCom Layer in OSEKtime. Shorter messages, i.e., shorter than 16 bytesin particular in this case, must be expanded or supplemented accordingto the specification, i.e., protocol guideline, i.e., the missing bytesmust be padded to the greatest possible message length, also 16 bytes inthis case, the padding cited. This means that the messages aretransmitted in binary information in particular, i.e., bits or bytes,the size of the message segments being selectable arbitrarily, 16 bytesin this case.

Therefore, in the example cited here a selected division of thecommunication cycles occurs, i.e., a division into 10 segments or slots.In this case, the duration of a slot is the length of the 16-bytemessage plus associated interframe gap IG. Due to the possibility of theinterframe gap being 0, segment and data segment are equivalent and aredesignated as S1 in this example. Therefore, the communication cycle iscomposed of 10×16 bytes plus the interframe gap, shown here from T29through 30, a time period in which no message may be transmitted, knownas network idle time NIT. This is optional, but shown herewith as apossible feature of the bus protocol. In this communication cycle, aconfiguration including only one static segment is assumed as anexample. For reasons of clarity, a possible dynamic segment between thestatic segment and the network idle time, i.e., at T29, is not shown.

User 103 is, for example, a simple angle sensor in the motor vehicle,which only has a 2-byte message to transmit. Therefore, a message memoryassigned to this sensor is also only tailored, specified, andimplemented for this data width, for reasons of cost in particular.Nonetheless, this angle sensor must also behave on the presented bussystem according to the specification, i.e., the bus protocol, andtransmit a 16-byte message in its assigned segment, i.e., itstransmission slot. For example, this slot is segment S1 plus associatedinterframe gap IG1 in this case. This means that shortly beforetransmission, the actual prepared message, for example, of exactly 2bytes, i.e., from T1 through T3 in this case, i.e., bytes S1, S12, andS13, would be stored in the transmission buffer or transmission memory,this data content, i.e., the sensor value, then having to be padded orexpanded by a further 14 bytes. In this case, according to the currentprocedure, the bytes would typically be placed left or right in theframe, i.e., by most significant bits, MSB, or least significant bits,LSB, which facilitates the further padding according to the currentprocedure. These used filling bytes, i.e., from S14 through S116 in theexample, are referred to as padding bytes or also as the padding patternor filling pattern, meaning a selected character segment that uniquelyidentifies the padding pattern or filling pattern, e.g., O×FF inhexadecimal representation. In the present case, sensor value 0×8005,corresponding to the angle information minus 0.5 degree in hexadecimalcoding with a negative prefix, for example, would be supplemented usingmost significant bit, MSB (set for a negative number) to

0×80/05/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF, supplemented intransmission memory or transmission buffer 109 in particular.

According to the current procedure if, as described above, the actualdata content is copied into transmission buffer 109 and thensupplemented with the padding pattern, incorrect padding may occur incase of error.

A) In this case, for example, the message content will be partiallyoverwritten. In this example, an incorrect message content,

0×80/0F/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF, arises. This meansthat the incorrect message content arising in this case will then beerroneously transmitted as sensor information, and the CRC, i.e., thecyclic redundancy check, calculated during transmission may not uncoverthis error. A plausibility test in the application may possibly uncoverthis error, but this is subject to great uncertainty.

B) Furthermore, the message content may also be completely overwritten,which then leads to 0×FF/F/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF,through which an incorrect message content would again arise. The cyclicredundancy check calculated during transmission may not uncover thiserror and even a plausibility test in the application may not uncoverthis error.

C) Furthermore, it is possible that the message length will besupplemented beyond the permissible length. In this case, data contentsor message contents of undefined content arise, such as0×80/05/77/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF/FF, i.e., an incorrectmessage content also arises here. The cyclic redundancy checkcalculation merely occurs over the 16 bytes and may not uncover theerror. The plausibility test may uncover this error, but only when theapplication checks beyond the actual message, i.e., the two bytes.

To achieve the object, the present invention suggests that the segment,i.e., the transmission buffer in particular in this case, be padded, andpadded completely, with the filling pattern or padding pattern beforeeach transmission procedure. In this context, of course, the predefinedmessage or data width, i.e., 16 bytes in this case for example, must bemaintained. This means that transmission slot or segment S1 of sensor103 is now padded with a filling pattern or padding pattern, i.e., bytesS11 through S116. Only then will the message content, i.e., the sensorvalue of 2 bytes in this case, be copied at the correct point in thesegment, i.e., in the transmission buffer in particular, therebyoverwriting the padding or filling pattern at these points.Above-mentioned error cases A through C are therefore prevented. Inaddition, any arbitrary position may be predetermined for the datacontent, i.e., the actual sensor value to be transmitted, since thefilling pattern is written first and a complicated subsequent paddingwith bytes in the course of the padding is no longer necessary.

Therefore, the simple method cited according to the present inventionallows high reliability to be produced via a simple measure, inparticular by design, the efficiency of the protocol execution not beingendangered.

1-5. (canceled)
 6. A method for padding segments for transmitting dataon a bus system, the segments having a preset total number of binaryinformation pieces, comprising: transmitting the data in the segments;and in the event of transmission of data including less binaryinformation than a predetermined total number of the segments, paddingthe missing binary information of the data to the total number of thesegments by a filling pattern of a corresponding number of binaryinformation pieces, wherein the filling pattern includes a number ofbinary information pieces that corresponds to the total number of thesegments and is first written into the segment, and wherein the binaryinformation of the data is subsequently written into the same segment,the particular binary information of the filling pattern beingoverwritten by the binary information of the data.
 7. The method asrecited in claim 6, wherein: the binary information pieces includebytes.
 8. The method as recited in claim 6, wherein the binaryinformation of the filling pattern and the binary information of thedata are written in a buffer memory into the segment, and the segment istransmitted from the buffer memory to the bus system.
 9. The method asrecited in claim 6, wherein the bus system is a time-controlled bussystem, and the segments correspond to time slots on the bus system, thedata being transmitted in the corresponding time slots.
 10. A device forpadding segments for transmitting data on a bus system, the segmentshaving a predetermined total number of binary information pieces,comprising: a first arrangement for transmitting the data in thesegments; and a second arrangement for, in the event of transmission ofdata including less binary information than the predetermined totalnumber of the segment, padding the missing binary information of thedata to the total number of the segment through a filling pattern of acorresponding number of binary information pieces, wherein the secondmeans first writes the filling pattern, whose number of binaryinformation pieces corresponds to the total number of the segment, intothe segment and subsequently writes the binary information of the datainto the same segment, the particular binary information of the fillingpattern being overwritten by the binary information of the data.
 11. Thedevice as recited in claim 10, wherein: the binary information piecesinclude bytes.
 12. A bus system, comprising: a device for paddingsegments for transmitting data on the bus system, the segments having apredetermined total number of binary information pieces, the deviceincluding: a first arrangement for transmitting the data in thesegments; and a second arrangement for, in the event of transmission ofdata including less binary information than the predetermined totalnumber of the segment, padding the missing binary information of thedata to the total number of the segment through a filling pattern of acorresponding number of binary information pieces, wherein the secondmeans first writes the filling pattern, whose number of binaryinformation pieces corresponds to the total number of the segment, intothe segment and subsequently writes the binary information of the datainto the same segment, the particular binary information of the fillingpattern being overwritten by the binary information of the data.
 13. Thebus system as recited in claim 12, wherein: the binary informationpieces include bytes.